﻿<Window x:Class="CSSAdriverapp.EditDriver"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Edit Driver" Height="342" Width="482" xmlns:my="clr-namespace:CSSAdriverapp" Icon="/CSSA%20Driver%20App;component/lorry_green_256.ico">
        <Grid Background="#C5AFB1AF">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="252" />
                <ColumnDefinition Width="207*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="96" />
                <RowDefinition Height="141*" />
            </Grid.RowDefinitions>
        <Label Content="Selected Student Information" Grid.Column="1" Height="28" HorizontalAlignment="Left" Margin="21,68,0,0" Name="headingLabel" VerticalAlignment="Top" FontStyle="Italic" />
            <Rectangle Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Margin="0,9,0,37" Name="rectangle" Stroke="Black" Width="196" Fill="#FF9CB6B3" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="47,78,0,0" Name="eMailtextBox" VerticalAlignment="Top" Width="120" />
            <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="47,106,0,0" Name="phonetextBox" VerticalAlignment="Top" Width="120" />
            <Label Content="Email:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="0,76,0,0" Name="emailLabel" VerticalAlignment="Top" />
            <Label Content="Phone:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="0,105,0,0" Name="phoneLabel" VerticalAlignment="Top" />
            <Button Content="Edit Driver" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="112,138,0,0" Name="editDriverButton" VerticalAlignment="Top" Width="75" Click="editDriverButton_Click" />
            <Label Content="Driver Edit Succesful" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="47,167,0,0" Name="editSuccesfulLabel" VerticalAlignment="Top" Foreground="#FF489719" BorderBrush="{x:Null}" IsEnabled="True" Visibility="Hidden" />
        <DataGrid AutoGenerateColumns="False" Grid.RowSpan="2" HorizontalAlignment="Left" Margin="6,9,0,12" Name="displaydataGrid" VerticalAlignment="Stretch" Width="240" SelectionChanged="displaydataGrid_SelectionChanged" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:EditDriver, AncestorLevel=1}, Path=drivers}" ItemsSource="{Binding Path=drivers, RelativeSource={RelativeSource FindAncestor, AncestorType=my:EditDriver, AncestorLevel=1}}" AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None">
            <DataGrid.Columns>
                <!--<DataGridTextColumn Binding="{Binding Path=ID}" Header="ID" />-->
                <DataGridTextColumn Binding="{Binding Path=last_name}" Header="Last Name" />
                <DataGridTextColumn Binding="{Binding Path=first_name}" Header="First Name" />
            </DataGrid.Columns>
        </DataGrid>
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="47,50,0,0" Name="lastNametextBox" VerticalAlignment="Top" Width="120" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="47,21,0,0" Name="firstNametextBox" VerticalAlignment="Top" Width="120" />
        <Label Content="First:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="6,21,0,0" Name="label1" VerticalAlignment="Top" />
        <Label Content="Last:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="7,49,0,0" Name="label2" VerticalAlignment="Top" />
        <Button Content="Delete Driver" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="7,138,0,0" Name="Deletebutton" VerticalAlignment="Top" Width="75" Click="deleteButton_Click" />
    </Grid>
</Window>
